/*
 * Toedo
 * Copyright (C) 2009-2010 J. Devauchelle and contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 3 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

package org.toedo.model.enums;

public enum WikiMarkupType {
	
	EnTextile("Textile"), //$NON-NLS-1$
	EnMediawiki("Mediawiki"), //$NON-NLS-1$
	EnConfluence("Confluence"), //$NON-NLS-1$
	EnTrac("Trac"); //$NON-NLS-1$
	
	private String mValue;
	
	WikiMarkupType(String value) {
		mValue = value;
	}
	
	public String getValue() {
		return this.mValue;
	}
	
	public static WikiMarkupType getValueOf(String mode) {
		if (mode.equals("Textile")) { //$NON-NLS-1$
			return EnTextile;
		}
		if (mode.equals("Mediawiki")) { //$NON-NLS-1$
			return EnMediawiki;
		}
		if (mode.equals("Confluence")) { //$NON-NLS-1$
			return EnConfluence;
		}
		if (mode.equals("Trac")) { //$NON-NLS-1$
			return EnTrac;
		}
		return EnTextile;
	}

}
